package com.gitee.wsl.doc.html.selects

import com.gitee.wsl.doc.soup.CssSelectable
import com.gitee.wsl.doc.soup.CssSelector

/**
 * Will define a html5 custom tags css query selector.
 * By default, it will just be the specific tag-name.
 * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or
 * by passing a raw css query selector as parameter.
 * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged.
 * @see CssSelector
 * @param cssSelector
 * @return T
 */
 fun <T> CssSelectable.customTag(tag: String, cssSelector: String = "", init: CssSelector.() -> T): T =
        selection("$tag$cssSelector", init)
